Pirate Fleet 1

Object Oriented Design

Criteria Meet Specification

The student has created an object diagram describing the underlying objects and relationships that exist in Pirate Fleet app.

The submitted project includes an object diagram that contains:

  • representations for ships, mines, and the gameboard, and
  • relationships between the gameboard and ships/mines.

The student has added objects and relationships that go beyond the basic ones and demonstrate a deeper understanding of the object-oriented design of Pirate Fleet.

The diagram includes objects and relationships that convey:

  • the similarities between ships and mines
  • the existence of the human and computer player, and
  • the relationship between the human and computer player and the rest of the diagram’s objects and relationships.

Instantiate Ships

Criteria Meet Specification

The student has instantiated and added all proper ships required to start a game.

All ships required to start a game are properly added to and instantiated in the project code.

Instantiate Mines

Criteria Meet Specification

The student has created the Mine struct.

The project code defines a Mine struct that contains two properties:

  • a constant called location of type GridLocation
  • a constant called explosionText of type String

The student has instantiated and added the two mines required to start a game.

The two mines required to start the game are properly added to and instantiated in the project code. Each mine has a different value for explosionText.

What's the Damage, Captain?

Criteria Meet Specification

The student has correctly implemented the calculateFinalScore function.

The calculateFinalScore() function returns the correct value for a player’s final score.